   1              		.syntax unified
   2              		.cpu cortex-m3
   3              		.fpu softvfp
   4              		.eabi_attribute 20, 1
   5              		.eabi_attribute 21, 1
   6              		.eabi_attribute 23, 3
   7              		.eabi_attribute 24, 1
   8              		.eabi_attribute 25, 1
   9              		.eabi_attribute 26, 1
  10              		.eabi_attribute 30, 4
  11              		.eabi_attribute 34, 1
  12              		.eabi_attribute 18, 4
  13              		.thumb
  14              		.syntax unified
  15              		.file	"cli.c"
  16              		.text
  17              	.Ltext0:
  18              		.cfi_sections	.debug_frame
  19              		.section	.text.cli_GetLine,"ax",%progbits
  20              		.align	1
  21              		.global	cli_GetLine
  22              		.thumb
  23              		.thumb_func
  25              	cli_GetLine:
  26              	.LFB1:
  27              		.file 1 "uc_libc_dev/cli/cli.c"
   1:uc_libc_dev/cli/cli.c **** //
   2:uc_libc_dev/cli/cli.c **** //  $Id: args.c 56 2008-10-05 03:27:02Z jcw $
   3:uc_libc_dev/cli/cli.c **** //  $Revision: 56 $
   4:uc_libc_dev/cli/cli.c **** //  $Author: jcw $
   5:uc_libc_dev/cli/cli.c **** //  $Date: 2008-10-04 23:27:02 -0400 (Sat, 04 Oct 2008) $
   6:uc_libc_dev/cli/cli.c **** //  $HeadURL: http://tinymicros.com/svn_public/arm/lpc2148_demo/trunk/monitor/args.c $
   7:uc_libc_dev/cli/cli.c **** //
   8:uc_libc_dev/cli/cli.c **** 
   9:uc_libc_dev/cli/cli.c **** #include <stdio.h>
  10:uc_libc_dev/cli/cli.c **** #include <stdlib.h>
  11:uc_libc_dev/cli/cli.c **** #include <string.h>
  12:uc_libc_dev/cli/cli.c **** #include <ctype.h>
  13:uc_libc_dev/cli/cli.c **** 
  14:uc_libc_dev/cli/cli.c **** #include "cli.h"
  15:uc_libc_dev/cli/cli.c **** 
  16:uc_libc_dev/cli/cli.c **** static char *strtrim (char *s);
  17:uc_libc_dev/cli/cli.c **** const tCLI *cmd_list_active = NULL;
  18:uc_libc_dev/cli/cli.c **** #if defined(SIM_PROTEUS)
  19:uc_libc_dev/cli/cli.c **** static int initGet = 1;  // Sinaliza se é incio da entrada de comandos
  20:uc_libc_dev/cli/cli.c **** #else
  21:uc_libc_dev/cli/cli.c **** static u8 initGet = 1;  // Sinaliza se é incio da entrada de comandos
  22:uc_libc_dev/cli/cli.c **** #endif
  23:uc_libc_dev/cli/cli.c **** static u8 *p;
  24:uc_libc_dev/cli/cli.c **** static u8 c;
  25:uc_libc_dev/cli/cli.c **** 
  26:uc_libc_dev/cli/cli.c **** // ------------------------------------------------------------------------------------------------
  27:uc_libc_dev/cli/cli.c **** // Descrição:	Fica em loop para capturar dados vindo do console.
  28:uc_libc_dev/cli/cli.c **** // Parametros: 	*buffer: Ponteiro do buffer
  29:uc_libc_dev/cli/cli.c **** //				bufferLength: tamanho do buffer
  30:uc_libc_dev/cli/cli.c **** //				*prompt: Prompt para ser exibido
  31:uc_libc_dev/cli/cli.c **** // Retorna	:  A quantidade de dados processado no buffer
  32:uc_libc_dev/cli/cli.c **** // ------------------------------------------------------------------------------------------------
  33:uc_libc_dev/cli/cli.c **** //  bufferLength includes the space reserved for the \0
  34:uc_libc_dev/cli/cli.c **** int cli_GetLine (u8 *buffer, int bufferLength, const char *prompt) {
  28              		.loc 1 34 0
  29              		.cfi_startproc
  30              		@ args = 0, pretend = 0, frame = 0
  31              		@ frame_needed = 0, uses_anonymous_args = 0
  32              	.LVL0:
  33 0000 F8B5     		push	{r3, r4, r5, r6, r7, lr}
  34              	.LCFI0:
  35              		.cfi_def_cfa_offset 24
  36              		.cfi_offset 3, -24
  37              		.cfi_offset 4, -20
  38              		.cfi_offset 5, -16
  39              		.cfi_offset 6, -12
  40              		.cfi_offset 7, -8
  41              		.cfi_offset 14, -4
  35:uc_libc_dev/cli/cli.c ****   	if (initGet) { // Checa se é incio da entrada de comandos
  42              		.loc 1 35 0
  43 0002 354F     		ldr	r7, .L29
  34:uc_libc_dev/cli/cli.c ****   	if (initGet) { // Checa se é incio da entrada de comandos
  44              		.loc 1 34 0
  45 0004 0446     		mov	r4, r0
  46              		.loc 1 35 0
  47 0006 3B78     		ldrb	r3, [r7]	@ zero_extendqisi2
  34:uc_libc_dev/cli/cli.c ****   	if (initGet) { // Checa se é incio da entrada de comandos
  48              		.loc 1 34 0
  49 0008 0E46     		mov	r6, r1
  50              		.loc 1 35 0
  51 000a 43B1     		cbz	r3, .L2
  36:uc_libc_dev/cli/cli.c ****   		lprintf("%s", prompt);
  52              		.loc 1 36 0
  53 000c 3349     		ldr	r1, .L29+4
  54              	.LVL1:
  55 000e 0120     		movs	r0, #1
  56              	.LVL2:
  57 0010 FFF7FEFF 		bl	rprintf
  58              	.LVL3:
  37:uc_libc_dev/cli/cli.c ****   	  	p = buffer;
  59              		.loc 1 37 0
  60 0014 324B     		ldr	r3, .L29+8
  61 0016 1C60     		str	r4, [r3]
  38:uc_libc_dev/cli/cli.c ****   	  	*p = '\0';
  62              		.loc 1 38 0
  63 0018 0023     		movs	r3, #0
  64 001a 2370     		strb	r3, [r4]
  39:uc_libc_dev/cli/cli.c ****   	  	initGet = 0;
  65              		.loc 1 39 0
  66 001c 3B70     		strb	r3, [r7]
  67              	.L2:
  40:uc_libc_dev/cli/cli.c ****   	}
  41:uc_libc_dev/cli/cli.c **** 
  42:uc_libc_dev/cli/cli.c ****   	//while (1) { // FOI RETIRADO PARA QUE NÃO FIQUE NO LOOP ATÉ CHEGADA DO ENTER, PARA QUE OUTRAS F
  43:uc_libc_dev/cli/cli.c ****     if (lgetchar(&c) == pdPASS) {
  68              		.loc 1 43 0
  69 001e 314D     		ldr	r5, .L29+12
  70 0020 2846     		mov	r0, r5
  71 0022 FFF7FEFF 		bl	lgetchar
  72              	.LVL4:
  73 0026 0128     		cmp	r0, #1
  74 0028 0346     		mov	r3, r0
  75 002a 50D1     		bne	.L13
  44:uc_libc_dev/cli/cli.c **** 	  	switch (c) {
  76              		.loc 1 44 0
  77 002c 2A78     		ldrb	r2, [r5]	@ zero_extendqisi2
  78 002e 0D2A     		cmp	r2, #13
  79 0030 10D0     		beq	.L5
  80 0032 04D8     		bhi	.L6
  81 0034 082A     		cmp	r2, #8
  82 0036 18D0     		beq	.L7
  83 0038 0A2A     		cmp	r2, #10
  84 003a 0BD0     		beq	.L5
  85 003c 31E0     		b	.L4
  86              	.L6:
  87 003e 152A     		cmp	r2, #21
  88 0040 01D1     		bne	.L25
  45:uc_libc_dev/cli/cli.c **** 		case '\r' : // por causa da tecla enter do prompt no PROTEUS que envia \r
  46:uc_libc_dev/cli/cli.c ****     	case '\n' : // estamos usando o finalizar de comandos "\n" ou "\r\n", logo  vamos podemos igno
  47:uc_libc_dev/cli/cli.c ****     		lprintf(CMD_TERMINATOR);
  48:uc_libc_dev/cli/cli.c ****     		initGet = 1;
  49:uc_libc_dev/cli/cli.c ****     		return strlen ((char *) buffer);
  50:uc_libc_dev/cli/cli.c **** 
  51:uc_libc_dev/cli/cli.c ****     	case '\b' :
  52:uc_libc_dev/cli/cli.c ****     		if (p > buffer) {
  53:uc_libc_dev/cli/cli.c ****     			*--p = '\0';
  54:uc_libc_dev/cli/cli.c ****         		lprintf("\b \b");
  55:uc_libc_dev/cli/cli.c ****         	}
  56:uc_libc_dev/cli/cli.c ****         	break;
  57:uc_libc_dev/cli/cli.c ****         	break;
  58:uc_libc_dev/cli/cli.c **** 
  59:uc_libc_dev/cli/cli.c **** 	    case 0x15 : // CTRL-U
  60:uc_libc_dev/cli/cli.c ****     		while (p != buffer) {
  89              		.loc 1 60 0
  90 0042 274D     		ldr	r5, .L29+8
  91 0044 1FE0     		b	.L8
  92              	.L25:
  44:uc_libc_dev/cli/cli.c **** 	  	switch (c) {
  93              		.loc 1 44 0
  94 0046 2CD3     		bcc	.L4
  95 0048 FE2A     		cmp	r2, #254
  96 004a 2AD3     		bcc	.L4
  97              	.LVL5:
  61:uc_libc_dev/cli/cli.c ****     			lprintf("\b \b");
  62:uc_libc_dev/cli/cli.c ****             	--p;
  63:uc_libc_dev/cli/cli.c **** 	        }
  64:uc_libc_dev/cli/cli.c ****       		*p = '\0';
  65:uc_libc_dev/cli/cli.c ****       		break;
  66:uc_libc_dev/cli/cli.c **** 
  67:uc_libc_dev/cli/cli.c **** 	    case 0xfe :
  68:uc_libc_dev/cli/cli.c ****     	case 0xff :
  69:uc_libc_dev/cli/cli.c ****         	*buffer++ = c;
  98              		.loc 1 69 0
  99 004c 2270     		strb	r2, [r4]
  70:uc_libc_dev/cli/cli.c ****         	*buffer = '\0';
 100              		.loc 1 70 0
 101 004e 0022     		movs	r2, #0
 102 0050 6270     		strb	r2, [r4, #1]
  71:uc_libc_dev/cli/cli.c ****         	return 1;
 103              		.loc 1 71 0
 104 0052 3FE0     		b	.L3
 105              	.LVL6:
 106              	.L5:
  47:uc_libc_dev/cli/cli.c ****     		initGet = 1;
 107              		.loc 1 47 0
 108 0054 2449     		ldr	r1, .L29+16
 109 0056 0120     		movs	r0, #1
 110 0058 FFF7FEFF 		bl	rprintf
 111              	.LVL7:
  48:uc_libc_dev/cli/cli.c ****     		return strlen ((char *) buffer);
 112              		.loc 1 48 0
 113 005c 0123     		movs	r3, #1
 114 005e 3B70     		strb	r3, [r7]
  49:uc_libc_dev/cli/cli.c **** 
 115              		.loc 1 49 0
 116 0060 2046     		mov	r0, r4
  72:uc_libc_dev/cli/cli.c **** 	        		
  73:uc_libc_dev/cli/cli.c **** 	    default :
  74:uc_libc_dev/cli/cli.c **** 	    	if (p < buffer + bufferLength - 1 && c >= ' ' && c < 0x7f) {
  75:uc_libc_dev/cli/cli.c ****         		*p++ = c;
  76:uc_libc_dev/cli/cli.c ****             	*p = '\0';
  77:uc_libc_dev/cli/cli.c ****             	lprintf("%c", c);
  78:uc_libc_dev/cli/cli.c ****           	}
  79:uc_libc_dev/cli/cli.c **** 
  80:uc_libc_dev/cli/cli.c **** 	    	//lprintf("%c", c);
  81:uc_libc_dev/cli/cli.c **** 	    	break;
  82:uc_libc_dev/cli/cli.c ****       	}
  83:uc_libc_dev/cli/cli.c ****     }
  84:uc_libc_dev/cli/cli.c ****   	//}
  85:uc_libc_dev/cli/cli.c **** 
  86:uc_libc_dev/cli/cli.c ****   	return 0;
  87:uc_libc_dev/cli/cli.c **** }
 117              		.loc 1 87 0
 118 0062 BDE8F840 		pop	{r3, r4, r5, r6, r7, lr}
 119              	.LCFI1:
 120              		.cfi_remember_state
 121              		.cfi_restore 14
 122              		.cfi_restore 7
 123              		.cfi_restore 6
 124              		.cfi_restore 5
 125              		.cfi_restore 4
 126              		.cfi_restore 3
 127              		.cfi_def_cfa_offset 0
 128              	.LVL8:
  49:uc_libc_dev/cli/cli.c **** 
 129              		.loc 1 49 0
 130 0066 FFF7FEBF 		b	strlen
 131              	.LVL9:
 132              	.L7:
 133              	.LCFI2:
 134              		.cfi_restore_state
  52:uc_libc_dev/cli/cli.c ****     			*--p = '\0';
 135              		.loc 1 52 0
 136 006a 1D4A     		ldr	r2, .L29+8
 137 006c 1368     		ldr	r3, [r2]
 138 006e 9C42     		cmp	r4, r3
 139 0070 4FF00004 		mov	r4, #0
 140              	.LVL10:
 141 0074 2DD2     		bcs	.L14
  53:uc_libc_dev/cli/cli.c ****         		lprintf("\b \b");
 142              		.loc 1 53 0
 143 0076 591E     		subs	r1, r3, #1
 144 0078 1160     		str	r1, [r2]
 145 007a 03F8014C 		strb	r4, [r3, #-1]
  54:uc_libc_dev/cli/cli.c ****         	}
 146              		.loc 1 54 0
 147 007e 1B49     		ldr	r1, .L29+20
 148 0080 FFF7FEFF 		bl	rprintf
 149              	.LVL11:
 150 0084 25E0     		b	.L14
 151              	.LVL12:
 152              	.L8:
  60:uc_libc_dev/cli/cli.c ****     			lprintf("\b \b");
 153              		.loc 1 60 0
 154 0086 2B68     		ldr	r3, [r5]
 155 0088 9C42     		cmp	r4, r3
 156 008a 07D0     		beq	.L28
  61:uc_libc_dev/cli/cli.c ****             	--p;
 157              		.loc 1 61 0
 158 008c 1749     		ldr	r1, .L29+20
 159 008e 0120     		movs	r0, #1
 160 0090 FFF7FEFF 		bl	rprintf
 161              	.LVL13:
  62:uc_libc_dev/cli/cli.c **** 	        }
 162              		.loc 1 62 0
 163 0094 2B68     		ldr	r3, [r5]
 164 0096 013B     		subs	r3, r3, #1
 165 0098 2B60     		str	r3, [r5]
 166 009a F4E7     		b	.L8
 167              	.L28:
  64:uc_libc_dev/cli/cli.c ****       		break;
 168              		.loc 1 64 0
 169 009c 0023     		movs	r3, #0
 170 009e 2370     		strb	r3, [r4]
  65:uc_libc_dev/cli/cli.c **** 
 171              		.loc 1 65 0
 172 00a0 18E0     		b	.L3
 173              	.L4:
  74:uc_libc_dev/cli/cli.c ****         		*p++ = c;
 174              		.loc 1 74 0
 175 00a2 0F49     		ldr	r1, .L29+8
 176 00a4 013E     		subs	r6, r6, #1
 177              	.LVL14:
 178 00a6 0B68     		ldr	r3, [r1]
 179 00a8 3444     		add	r4, r4, r6
 180              	.LVL15:
 181 00aa A342     		cmp	r3, r4
 182 00ac 0FD2     		bcs	.L13
  74:uc_libc_dev/cli/cli.c ****         		*p++ = c;
 183              		.loc 1 74 0 is_stmt 0 discriminator 1
 184 00ae A2F12000 		sub	r0, r2, #32
 185 00b2 5E28     		cmp	r0, #94
 186 00b4 4FF00004 		mov	r4, #0
 187 00b8 0BD8     		bhi	.L14
  75:uc_libc_dev/cli/cli.c ****             	*p = '\0';
 188              		.loc 1 75 0 is_stmt 1
 189 00ba 581C     		adds	r0, r3, #1
 190 00bc 1A70     		strb	r2, [r3]
 191 00be 0860     		str	r0, [r1]
  76:uc_libc_dev/cli/cli.c ****             	lprintf("%c", c);
 192              		.loc 1 76 0
 193 00c0 5C70     		strb	r4, [r3, #1]
  77:uc_libc_dev/cli/cli.c ****           	}
 194              		.loc 1 77 0
 195 00c2 2A78     		ldrb	r2, [r5]	@ zero_extendqisi2
 196 00c4 0A49     		ldr	r1, .L29+24
 197 00c6 0120     		movs	r0, #1
 198 00c8 FFF7FEFF 		bl	rprintf
 199              	.LVL16:
 200 00cc 01E0     		b	.L14
 201              	.LVL17:
 202              	.L13:
  86:uc_libc_dev/cli/cli.c **** }
 203              		.loc 1 86 0
 204 00ce 0023     		movs	r3, #0
 205 00d0 00E0     		b	.L3
 206              	.L14:
 207 00d2 2346     		mov	r3, r4
 208              	.LVL18:
 209              	.L3:
 210              		.loc 1 87 0
 211 00d4 1846     		mov	r0, r3
 212 00d6 F8BD     		pop	{r3, r4, r5, r6, r7, pc}
 213              	.L30:
 214              		.align	2
 215              	.L29:
 216 00d8 00000000 		.word	.LANCHOR0
 217 00dc 00000000 		.word	.LC0
 218 00e0 00000000 		.word	.LANCHOR1
 219 00e4 00000000 		.word	.LANCHOR2
 220 00e8 03000000 		.word	.LC1
 221 00ec 05000000 		.word	.LC2
 222 00f0 09000000 		.word	.LC3
 223              		.cfi_endproc
 224              	.LFE1:
 226              		.section	.text.cli_Help,"ax",%progbits
 227              		.align	1
 228              		.global	cli_Help
 229              		.thumb
 230              		.thumb_func
 232              	cli_Help:
 233              	.LFB2:
  88:uc_libc_dev/cli/cli.c **** 
  89:uc_libc_dev/cli/cli.c **** // ------------------------------------------------------------------------------------------------
  90:uc_libc_dev/cli/cli.c **** // Descrição:	Exibe a lista de comandos de help dos comandos
  91:uc_libc_dev/cli/cli.c **** // Parametros:
  92:uc_libc_dev/cli/cli.c **** // Retorna:
  93:uc_libc_dev/cli/cli.c **** // ------------------------------------------------------------------------------------------------
  94:uc_libc_dev/cli/cli.c **** int cli_Help (int argc __attribute__ ((unused)), portCHAR **argv __attribute__ ((unused))) {
 234              		.loc 1 94 0
 235              		.cfi_startproc
 236              		@ args = 0, pretend = 0, frame = 32
 237              		@ frame_needed = 0, uses_anonymous_args = 0
 238              	.LVL19:
 239 0000 2DE9F041 		push	{r4, r5, r6, r7, r8, lr}
 240              	.LCFI3:
 241              		.cfi_def_cfa_offset 24
 242              		.cfi_offset 4, -24
 243              		.cfi_offset 5, -20
 244              		.cfi_offset 6, -16
 245              		.cfi_offset 7, -12
 246              		.cfi_offset 8, -8
 247              		.cfi_offset 14, -4
  95:uc_libc_dev/cli/cli.c ****   	unsigned int i;
  96:uc_libc_dev/cli/cli.c ****   	int t;
  97:uc_libc_dev/cli/cli.c ****   	int longestCmd;
  98:uc_libc_dev/cli/cli.c ****   	portCHAR spaces [32];
  99:uc_libc_dev/cli/cli.c **** 
 100:uc_libc_dev/cli/cli.c ****   	memset (spaces, ' ', sizeof (spaces));
 101:uc_libc_dev/cli/cli.c **** 
 102:uc_libc_dev/cli/cli.c ****   	for (longestCmd = 0, i = 0; cmd_list_active[i].command; i++)
 248              		.loc 1 102 0
 249 0004 0025     		movs	r5, #0
 250 0006 2C46     		mov	r4, r5
  94:uc_libc_dev/cli/cli.c ****   	unsigned int i;
 251              		.loc 1 94 0
 252 0008 8AB0     		sub	sp, sp, #40
 253              	.LCFI4:
 254              		.cfi_def_cfa_offset 64
 100:uc_libc_dev/cli/cli.c **** 
 255              		.loc 1 100 0
 256 000a 2022     		movs	r2, #32
 257              		.loc 1 102 0
 258 000c 1E4E     		ldr	r6, .L41
 100:uc_libc_dev/cli/cli.c **** 
 259              		.loc 1 100 0
 260 000e 1146     		mov	r1, r2
 261              	.LVL20:
 262 0010 02A8     		add	r0, sp, #8
 263              	.LVL21:
 264 0012 FFF7FEFF 		bl	memset
 265              	.LVL22:
 266              		.loc 1 102 0
 267 0016 3768     		ldr	r7, [r6]
 268              	.LVL23:
 269              	.L32:
 270 0018 1435     		adds	r5, r5, #20
 271              		.loc 1 102 0 is_stmt 0 discriminator 1
 272 001a 7B19     		adds	r3, r7, r5
 273 001c 53F8140C 		ldr	r0, [r3, #-20]
 274 0020 28B1     		cbz	r0, .L39
 103:uc_libc_dev/cli/cli.c ****     	if ((t = strlen (cmd_list_active[i].command)) > longestCmd)
 275              		.loc 1 103 0 is_stmt 1
 276 0022 FFF7FEFF 		bl	strlen
 277              	.LVL24:
 278 0026 8442     		cmp	r4, r0
 279 0028 B8BF     		it	lt
 280 002a 0446     		movlt	r4, r0
 281              	.LVL25:
 282 002c F4E7     		b	.L32
 283              	.LVL26:
 284              	.L39:
 104:uc_libc_dev/cli/cli.c ****       		longestCmd = t;
 105:uc_libc_dev/cli/cli.c **** 
 106:uc_libc_dev/cli/cli.c ****   	spaces [longestCmd] = '\0';
 285              		.loc 1 106 0
 286 002e 0AAB     		add	r3, sp, #40
 287 0030 1C44     		add	r4, r4, r3
 288              	.LVL27:
 289 0032 04F8200C 		strb	r0, [r4, #-32]
 290              	.LVL28:
 107:uc_libc_dev/cli/cli.c **** 
 108:uc_libc_dev/cli/cli.c ****   	for (i = 0; cmd_list_active[i].command; i++) {
 291              		.loc 1 108 0
 292 0036 0446     		mov	r4, r0
 293              	.LVL29:
 294              	.L34:
 295              		.loc 1 108 0 is_stmt 0 discriminator 1
 296 0038 3368     		ldr	r3, [r6]
 297 003a 1D59     		ldr	r5, [r3, r4]
 298 003c 1A19     		adds	r2, r3, r4
 299 003e DDB1     		cbz	r5, .L40
 300              	.LVL30:
 301              	.LBB2:
 109:uc_libc_dev/cli/cli.c ****     	const tCLI *cl = &cmd_list_active[i];
 110:uc_libc_dev/cli/cli.c **** 
 111:uc_libc_dev/cli/cli.c ****     	if (cl->cmd_type == CMD_TYPE_FUNCTION)
 302              		.loc 1 111 0 is_stmt 1
 303 0040 92F80680 		ldrb	r8, [r2, #6]	@ zero_extendqisi2
 112:uc_libc_dev/cli/cli.c ****     		lprintf("%s%s -- %s"CMD_TERMINATOR, cl->command, &spaces [strlen (cl->command)], cl->descript
 304              		.loc 1 112 0
 305 0044 2846     		mov	r0, r5
 111:uc_libc_dev/cli/cli.c ****     		lprintf("%s%s -- %s"CMD_TERMINATOR, cl->command, &spaces [strlen (cl->command)], cl->descript
 306              		.loc 1 111 0
 307 0046 B8F1010F 		cmp	r8, #1
 308 004a D768     		ldr	r7, [r2, #12]
 309 004c 08D1     		bne	.L35
 310              		.loc 1 112 0
 311 004e FFF7FEFF 		bl	strlen
 312              	.LVL31:
 313 0052 02AB     		add	r3, sp, #8
 314 0054 0344     		add	r3, r3, r0
 315 0056 0097     		str	r7, [sp]
 316 0058 2A46     		mov	r2, r5
 317 005a 0C49     		ldr	r1, .L41+4
 318 005c 4046     		mov	r0, r8
 319 005e 07E0     		b	.L38
 320              	.LVL32:
 321              	.L35:
 113:uc_libc_dev/cli/cli.c ****     	else
 114:uc_libc_dev/cli/cli.c ****     		lprintf("%s%s -- " CLI_MSG_SUB_LIST " - %s"CMD_TERMINATOR, cl->command, &spaces [strlen (cl->
 322              		.loc 1 114 0
 323 0060 FFF7FEFF 		bl	strlen
 324              	.LVL33:
 325 0064 2A46     		mov	r2, r5
 326 0066 02AB     		add	r3, sp, #8
 327 0068 0949     		ldr	r1, .L41+8
 328 006a 0344     		add	r3, r3, r0
 329 006c 0097     		str	r7, [sp]
 330 006e 0120     		movs	r0, #1
 331              	.L38:
 332 0070 FFF7FEFF 		bl	rprintf
 333              	.LVL34:
 334 0074 1434     		adds	r4, r4, #20
 335 0076 DFE7     		b	.L34
 336              	.L40:
 337              	.LBE2:
 115:uc_libc_dev/cli/cli.c ****   	}
 116:uc_libc_dev/cli/cli.c **** 
 117:uc_libc_dev/cli/cli.c ****   	lprintf(CLI_MSG_HELP);
 338              		.loc 1 117 0
 339 0078 0649     		ldr	r1, .L41+12
 340 007a 0120     		movs	r0, #1
 341 007c FFF7FEFF 		bl	rprintf
 342              	.LVL35:
 118:uc_libc_dev/cli/cli.c **** 
 119:uc_libc_dev/cli/cli.c ****   	return pdPASS;
 120:uc_libc_dev/cli/cli.c **** }
 343              		.loc 1 120 0
 344 0080 0120     		movs	r0, #1
 345 0082 0AB0     		add	sp, sp, #40
 346              	.LCFI5:
 347              		.cfi_def_cfa_offset 24
 348              		@ sp needed
 349 0084 BDE8F081 		pop	{r4, r5, r6, r7, r8, pc}
 350              	.L42:
 351              		.align	2
 352              	.L41:
 353 0088 00000000 		.word	.LANCHOR3
 354 008c 0C000000 		.word	.LC4
 355 0090 18000000 		.word	.LC5
 356 0094 2E000000 		.word	.LC6
 357              		.cfi_endproc
 358              	.LFE2:
 360              		.section	.text.cli_ArgsParse,"ax",%progbits
 361              		.align	1
 362              		.global	cli_ArgsParse
 363              		.thumb
 364              		.thumb_func
 366              	cli_ArgsParse:
 367              	.LFB3:
 121:uc_libc_dev/cli/cli.c **** 
 122:uc_libc_dev/cli/cli.c **** 
 123:uc_libc_dev/cli/cli.c **** // ------------------------------------------------------------------------------------------------
 124:uc_libc_dev/cli/cli.c **** // Descrição: Captura os endereços do buffer do comando (cmd), que se referem a cada argumento, e g
 125:uc_libc_dev/cli/cli.c **** //      Esta função encontra os argumentos contidos no buffer do comando (cmd), e separa-os com fin
 126:uc_libc_dev/cli/cli.c **** //      argv[0] = primeiro argumento, que é o endereço inicial do comando do buffer cmd, e as demai
 127:uc_libc_dev/cli/cli.c **** //		OBS: Os caracteres white-space são 9,10,11,12,13 e 32 = '\t' '\r\n' '\v' '\f' '\r' e ' '
 128:uc_libc_dev/cli/cli.c **** // Exemplo:
 129:uc_libc_dev/cli/cli.c **** //		cmd = set screen 720 480
 130:uc_libc_dev/cli/cli.c **** //							addr cmd 	00 01 02 03 04 05 06 08 09 10 11 12 13 14 15 16 17 18
 131:uc_libc_dev/cli/cli.c **** //			     			cmd	 	  	 s  e  t     s  c  r  e  e  n     7  2  0     4  8  0
 132:uc_libc_dev/cli/cli.c **** //							addr argv 	00 01 02 03 04 05 06 08 09 10 11 12 13 14 15 16 17
 133:uc_libc_dev/cli/cli.c **** //		argv aponta para:	argv     	00 04 12 16
 134:uc_libc_dev/cli/cli.c **** // Parametros: 
 135:uc_libc_dev/cli/cli.c **** //				*cmd:		Ponteiro da string do buffer do comando
 136:uc_libc_dev/cli/cli.c **** //				**argv: 	Endereço do vetor de endereços para armazenar as posições dos argumentos contidos no
 137:uc_libc_dev/cli/cli.c **** // 				sizeofArgv: Sinaliza a qantidade de posições disponíveis no argv
 138:uc_libc_dev/cli/cli.c **** //				*argc: 		Ponteiro para inteiro. Este guarda a quantidade de argumentos encontrados no comando
 139:uc_libc_dev/cli/cli.c **** // Retorna:	
 140:uc_libc_dev/cli/cli.c **** //				Retorna psPASS se a operação foi feita para todos os argumentos
 141:uc_libc_dev/cli/cli.c **** //				Retorna errCLI_EXED_ARGS se a quantidade de argumetos superou a quantidade máxima
 142:uc_libc_dev/cli/cli.c **** // ------------------------------------------------------------------------------------------------
 143:uc_libc_dev/cli/cli.c **** typedef enum {
 144:uc_libc_dev/cli/cli.c ****   	P_WAIT_INIT_ARGS = 0, // Estado de espera do inicio do argumento
 145:uc_libc_dev/cli/cli.c ****   	P_GET_INIT_ARGS,
 146:uc_libc_dev/cli/cli.c ****   	P_SET_END_ARGS,
 147:uc_libc_dev/cli/cli.c ****   	P_SET_END_QUOTE
 148:uc_libc_dev/cli/cli.c **** } p_state_t;
 149:uc_libc_dev/cli/cli.c **** 
 150:uc_libc_dev/cli/cli.c **** int cli_ArgsParse (char *cmd, char **argv, int sizeofArgv, int *argc) {
 368              		.loc 1 150 0
 369              		.cfi_startproc
 370              		@ args = 0, pretend = 0, frame = 0
 371              		@ frame_needed = 0, uses_anonymous_args = 0
 372              	.LVL36:
 373 0000 2DE9F047 		push	{r4, r5, r6, r7, r8, r9, r10, lr}
 374              	.LCFI6:
 375              		.cfi_def_cfa_offset 32
 376              		.cfi_offset 4, -32
 377              		.cfi_offset 5, -28
 378              		.cfi_offset 6, -24
 379              		.cfi_offset 7, -20
 380              		.cfi_offset 8, -16
 381              		.cfi_offset 9, -12
 382              		.cfi_offset 10, -8
 383              		.cfi_offset 14, -4
 384              		.loc 1 150 0
 385 0004 0446     		mov	r4, r0
 151:uc_libc_dev/cli/cli.c ****   	int max_args = (sizeofArgv / sizeof (argv [0])) - 1;	// Determina a quantidade máximo de argumet
 386              		.loc 1 151 0
 387 0006 9708     		lsrs	r7, r2, #2
 150:uc_libc_dev/cli/cli.c ****   	int max_args = (sizeofArgv / sizeof (argv [0])) - 1;	// Determina a quantidade máximo de argumet
 388              		.loc 1 150 0
 389 0008 0E46     		mov	r6, r1
 390 000a 9146     		mov	r9, r2
 391 000c 9846     		mov	r8, r3
 392              	.LBB5:
 393              	.LBB6:
 152:uc_libc_dev/cli/cli.c ****   	char *s = strtrim (cmd); 								// Retira espaços em branco ou caracteres de controle do lado d
 153:uc_libc_dev/cli/cli.c ****   	
 154:uc_libc_dev/cli/cli.c ****   	p_state_t pstate = P_WAIT_INIT_ARGS;					// Sinalizo para esperar pelo separado de argumentos qu
 155:uc_libc_dev/cli/cli.c **** 
 156:uc_libc_dev/cli/cli.c ****   	*argc = 0;												// Sinaliza que ainda não capturou nenhum argumento
 157:uc_libc_dev/cli/cli.c ****   	memset (argv, 0, sizeofArgv); 							// Preenche os endereços do argv com valores 0, ou seja, li
 158:uc_libc_dev/cli/cli.c ****   	
 159:uc_libc_dev/cli/cli.c ****   	while (*s) {											// Fazer para toda os caracteres do comando
 160:uc_libc_dev/cli/cli.c ****     	switch (pstate) {
 161:uc_libc_dev/cli/cli.c ****       		// PROCURA O INICIO DO ARGUMENTO
 162:uc_libc_dev/cli/cli.c ****       		case P_WAIT_INIT_ARGS :  {						// Checa se estamos esperando pelo separador de argumentos,
 163:uc_libc_dev/cli/cli.c ****           		if (!isspace ((int)*s))  						// Checa se a posição atual não é um white-space, sinali
 164:uc_libc_dev/cli/cli.c ****             		pstate = P_GET_INIT_ARGS;				// Sinalizo para ir para o estado de captura do argument
 165:uc_libc_dev/cli/cli.c ****           		else
 166:uc_libc_dev/cli/cli.c ****             		s++;									// Aponto para o próximo endereço do caractere do comando
 167:uc_libc_dev/cli/cli.c ****         	}
 168:uc_libc_dev/cli/cli.c ****         	break;
 169:uc_libc_dev/cli/cli.c **** 
 170:uc_libc_dev/cli/cli.c ****       		// CAPTURO A POSIÇÃO, ENDEREÇO, INICIAL DO ARGUMENTO NO VETOR DE COMANDOS
 171:uc_libc_dev/cli/cli.c ****       		case P_GET_INIT_ARGS : {
 172:uc_libc_dev/cli/cli.c ****           		*argv++ = s; 								// Captura o endereço S, posição X do buffer, e aponta para o próx
 173:uc_libc_dev/cli/cli.c **** 
 174:uc_libc_dev/cli/cli.c ****           		if (++*argc == max_args)					// Incremento a quantidade de argumetos encontrado e checa
 175:uc_libc_dev/cli/cli.c ****         	    	return errCLI_EXED_ARGS;					// Retorna erro
 176:uc_libc_dev/cli/cli.c **** 	          	if (*s == '"')								// Checa se encontramos o caractere aspa. Sinaliza inicio do para
 177:uc_libc_dev/cli/cli.c ****     	        	pstate = P_SET_END_QUOTE;				// Vai ao estado de encontrar fim das aspas, isto porque
 178:uc_libc_dev/cli/cli.c ****         	  	else
 179:uc_libc_dev/cli/cli.c ****             		pstate = P_SET_END_ARGS;				// Vai ao estado de de encontrar fim do argumento
 180:uc_libc_dev/cli/cli.c **** 
 181:uc_libc_dev/cli/cli.c **** 	          	s++;										// Aponto para o próximo endereço do caractere do comando
 182:uc_libc_dev/cli/cli.c ****     	    }
 183:uc_libc_dev/cli/cli.c ****         	break;
 184:uc_libc_dev/cli/cli.c **** 
 185:uc_libc_dev/cli/cli.c ****       		// ENCONTRA FIM DO ARGUMENTO E SINALIZA NA POSIÇÃO, ENDEREÇO, DO COMANDO COM O CARACTERE NU
 186:uc_libc_dev/cli/cli.c ****       		case P_SET_END_ARGS : {
 187:uc_libc_dev/cli/cli.c ****           		if (isspace ((int)*s)) {							// Checa se o caractere atual é um whitespace
 188:uc_libc_dev/cli/cli.c ****             		pstate = P_WAIT_INIT_ARGS;				// Sinaliza para ir a estado para captura do prróximo a
 189:uc_libc_dev/cli/cli.c ****             		*s = '\0';								// Sinaliza na posição atual que é o fim do argumento atual
 190:uc_libc_dev/cli/cli.c ****           		}  else if (*s == '"')						// Checa se encontramos o caractere aspa. Sinaliza inicio d
 191:uc_libc_dev/cli/cli.c ****             		pstate = P_SET_END_QUOTE;				// Vai ao estado de encontrar fim do argumentos dentro d
 192:uc_libc_dev/cli/cli.c **** 
 193:uc_libc_dev/cli/cli.c ****           		s++;										// Aponto para o próximo endereço do caractere do comando
 194:uc_libc_dev/cli/cli.c ****        		}
 195:uc_libc_dev/cli/cli.c ****         		break;
 196:uc_libc_dev/cli/cli.c **** 
 197:uc_libc_dev/cli/cli.c ****       		// ECONTRA O FIM DAS ASPAS PARA SINALIZAR FIM DE ARGUMENTO
 198:uc_libc_dev/cli/cli.c ****       		case P_SET_END_QUOTE : {
 199:uc_libc_dev/cli/cli.c ****           		if (*s == '"')	pstate = P_SET_END_ARGS;	// Checa se encontramos o caractere aspa. Sinal
 200:uc_libc_dev/cli/cli.c ****           		
 201:uc_libc_dev/cli/cli.c ****           		s++;										// Aponto para o próximo endereço do caractere do comando
 202:uc_libc_dev/cli/cli.c ****         	}
 203:uc_libc_dev/cli/cli.c ****         		break;
 204:uc_libc_dev/cli/cli.c ****     	}
 205:uc_libc_dev/cli/cli.c ****   	}
 206:uc_libc_dev/cli/cli.c **** 
 207:uc_libc_dev/cli/cli.c ****   	return pdPASS;												// Retorna que OK
 208:uc_libc_dev/cli/cli.c **** }
 209:uc_libc_dev/cli/cli.c **** 
 210:uc_libc_dev/cli/cli.c **** // ------------------------------------------------------------------------------------------------
 211:uc_libc_dev/cli/cli.c **** // Descrição:  Procura o comando digitado pelo usuário ,contindo no argv[0], na lista de comandos 
 212:uc_libc_dev/cli/cli.c **** //                  Se encontrou o comando, chama a função anexado este comando passando:
 213:uc_libc_dev/cli/cli.c **** //                      argc: Quantidade de argumentos a ser passado para a função
 214:uc_libc_dev/cli/cli.c **** //                      argv: Os argumentos passado para a função menos o comando digitado
 215:uc_libc_dev/cli/cli.c **** // Parametros:
 216:uc_libc_dev/cli/cli.c **** //              cl: Ponteiro da lista de comandos
 217:uc_libc_dev/cli/cli.c **** //              argc: Quantidade de argumentos encontrados no comando
 218:uc_libc_dev/cli/cli.c **** //              argv: Lista de arqumentos encontrado no comando
 219:uc_libc_dev/cli/cli.c **** // Retorna:    
 220:uc_libc_dev/cli/cli.c **** //              Valor do retorno da função chamada
 221:uc_libc_dev/cli/cli.c **** //              errCLI_CMD_NOT_FOUND: Se não encontrou o comando digitado na lista de comandos
 222:uc_libc_dev/cli/cli.c **** //              errCLI_MANY_ARGS: Caso tenha muitos argumentos para o comando atual
 223:uc_libc_dev/cli/cli.c **** //              errCLI_FEW_ARGS: Caso tenha pouco argumentos para o comando atual
 224:uc_libc_dev/cli/cli.c **** // ------------------------------------------------------------------------------------------------
 225:uc_libc_dev/cli/cli.c **** int cli_ArgsDispatch (const tCLI *cl, int argc, char **argv) {
 226:uc_libc_dev/cli/cli.c ****   	cmd_list_active = cl;
 227:uc_libc_dev/cli/cli.c **** 
 228:uc_libc_dev/cli/cli.c ****   	while (cl->command) { 								// Percorre toda lista de comandos
 229:uc_libc_dev/cli/cli.c ****     	if (!strcmp (cl->command, argv [0])) {			// Checa se o comando atual é o mesmo digitado
 230:uc_libc_dev/cli/cli.c ****       		int ret = 0;
 231:uc_libc_dev/cli/cli.c **** 
 232:uc_libc_dev/cli/cli.c ****       		if ((argc == 2) && !strcmp (argv [1], "?")) { // Checa se foi digitaldo ? para o comando 
 233:uc_libc_dev/cli/cli.c ****         		lprintf("%s"CMD_TERMINATOR, cl->parameters);		// Exibe ajuda para os parametros
 234:uc_libc_dev/cli/cli.c ****         		ret = pdPASS;
 235:uc_libc_dev/cli/cli.c ****       		} else if ((argc - 1) < cl->min_args) {			// Checa se a quantidade de argumentos digitados 
 236:uc_libc_dev/cli/cli.c ****         		lprintf(CLI_MSG_FEW_ARGS, cl->min_args);
 237:uc_libc_dev/cli/cli.c ****         		ret = errCLI_FEW_ARGS;
 238:uc_libc_dev/cli/cli.c ****       		} else if (cl->cmd_type == CMD_TYPE_LIST) {		// Checa se é um comando ou uma nome de outra 
 239:uc_libc_dev/cli/cli.c ****         		ret = cli_ArgsDispatch (cl->cmd_list, argc - 1, &argv [1]); // Chama essa a sub lista
 240:uc_libc_dev/cli/cli.c ****       		} else if ((argc - 1) > cl->max_args) {			// Checa se a quantidade de argumentos digitados 
 241:uc_libc_dev/cli/cli.c ****         		lprintf(CLI_MSG_MANY_ARGS, cl->max_args);
 242:uc_libc_dev/cli/cli.c ****         		ret = errCLI_MANY_ARGS;
 243:uc_libc_dev/cli/cli.c ****       		} else {
 244:uc_libc_dev/cli/cli.c ****         		ret = (*cl->handler) (argc - 1, &argv [1]); // Chama a função anexado a esse comando
 245:uc_libc_dev/cli/cli.c ****         	}
 246:uc_libc_dev/cli/cli.c **** 
 247:uc_libc_dev/cli/cli.c ****       		return ret;										// Retorna o valor de retorno da função ou 0 se não chamou função algu
 248:uc_libc_dev/cli/cli.c ****     	}
 249:uc_libc_dev/cli/cli.c **** 
 250:uc_libc_dev/cli/cli.c ****     	cl++;											// aponta para o próximo comando na lista 
 251:uc_libc_dev/cli/cli.c ****   	}
 252:uc_libc_dev/cli/cli.c **** 
 253:uc_libc_dev/cli/cli.c ****   	//if (!cl->command)
 254:uc_libc_dev/cli/cli.c ****     	//lprintf(CLI_MSG_UNKNOWN_CMD " \"%sCMD_TERMINATOR, argv [0]);
 255:uc_libc_dev/cli/cli.c **** 
 256:uc_libc_dev/cli/cli.c ****   	return errCLI_CMD_NOT_FOUND;
 257:uc_libc_dev/cli/cli.c **** }
 258:uc_libc_dev/cli/cli.c **** 
 259:uc_libc_dev/cli/cli.c **** // ------------------------------------------------------------------------------------------------
 260:uc_libc_dev/cli/cli.c **** // Descrição: Retorna com o endereço inicial do comando na string e colocar o caractere nulo no fim
 261:uc_libc_dev/cli/cli.c **** //				Ou seja, retira os espaços em branco do lado dirieto e esquerdo da string
 262:uc_libc_dev/cli/cli.c **** // Parametros: ponteiro da string
 263:uc_libc_dev/cli/cli.c **** // Retorna:		Ponteiro da strinf na posição onde começa o comando
 264:uc_libc_dev/cli/cli.c **** // ------------------------------------------------------------------------------------------------
 265:uc_libc_dev/cli/cli.c **** static char *strtrim (char *s) {
 266:uc_libc_dev/cli/cli.c ****   	char *t = s + strlen (s) - 1; 			// Aponta o endereço para o último caractere da string
 394              		.loc 1 266 0
 395 000e FFF7FEFF 		bl	strlen
 396              	.LVL37:
 397 0012 0138     		subs	r0, r0, #1
 398              	.LBE6:
 399              	.LBE5:
 151:uc_libc_dev/cli/cli.c ****   	char *s = strtrim (cmd); 								// Retira espaços em branco ou caracteres de controle do lado d
 400              		.loc 1 151 0
 401 0014 013F     		subs	r7, r7, #1
 402              	.LVL38:
 403              	.LBB8:
 404              	.LBB7:
 405              		.loc 1 266 0
 406 0016 2518     		adds	r5, r4, r0
 407              	.LVL39:
 267:uc_libc_dev/cli/cli.c **** 
 268:uc_libc_dev/cli/cli.c ****   	// COLOCO O FINALIZAR LOGO APÓS O COMANDO. OU SEJA, RETIRA OS ESPAÇOS EM BRANCO DO LADO DIREITO 
 269:uc_libc_dev/cli/cli.c ****   	while (t >= s && *t && isspace ((int)*t)) 	// Faça enquanto o endereço t seja maior ou igual ao 
 270:uc_libc_dev/cli/cli.c ****   		*t-- = '\0'; 						// Posição atual da string recebe nulo e aponto para o endereço anterior na 
 408              		.loc 1 270 0
 409 0018 4FF0000A 		mov	r10, #0
 410              	.LVL40:
 411              	.L44:
 269:uc_libc_dev/cli/cli.c ****   		*t-- = '\0'; 						// Posição atual da string recebe nulo e aponto para o endereço anterior na 
 412              		.loc 1 269 0
 413 001c AC42     		cmp	r4, r5
 414 001e 13D8     		bhi	.L46
 415 0020 2B78     		ldrb	r3, [r5]	@ zero_extendqisi2
 416 0022 8BB1     		cbz	r3, .L46
 417 0024 FFF7FEFF 		bl	__locale_ctype_ptr
 418              	.LVL41:
 419 0028 2B78     		ldrb	r3, [r5]	@ zero_extendqisi2
 420 002a 1844     		add	r0, r0, r3
 421 002c 4378     		ldrb	r3, [r0, #1]	@ zero_extendqisi2
 422 002e 1B07     		lsls	r3, r3, #28
 423 0030 0AD5     		bpl	.L46
 424              		.loc 1 270 0
 425 0032 05F801A9 		strb	r10, [r5], #-1
 426              	.LVL42:
 427 0036 F1E7     		b	.L44
 428              	.LVL43:
 429              	.L49:
 271:uc_libc_dev/cli/cli.c **** 
 272:uc_libc_dev/cli/cli.c ****   	// ENCONTRA O INICIO DO COMANDO. OU SEJA, RETIRA OS ESPAÇOS EM BRANCO DO LADO ESQUERDO DA STRING
 273:uc_libc_dev/cli/cli.c ****   	while (*s && isspace ((int)*s)) 		// Faça enquanto o endereço s seja menor que o endereço final 
 430              		.loc 1 273 0
 431 0038 FFF7FEFF 		bl	__locale_ctype_ptr
 432              	.LVL44:
 433 003c 2B78     		ldrb	r3, [r5]	@ zero_extendqisi2
 434 003e 0134     		adds	r4, r4, #1
 435              	.LVL45:
 436 0040 1844     		add	r0, r0, r3
 437 0042 4378     		ldrb	r3, [r0, #1]	@ zero_extendqisi2
 438 0044 1807     		lsls	r0, r3, #28
 439 0046 03D5     		bpl	.L51
 440              	.LVL46:
 441              	.L46:
 442 0048 2378     		ldrb	r3, [r4]	@ zero_extendqisi2
 443 004a 2546     		mov	r5, r4
 444              	.LVL47:
 445 004c 002B     		cmp	r3, #0
 446 004e F3D1     		bne	.L49
 447              	.LVL48:
 448              	.L51:
 449              	.LBE7:
 450              	.LBE8:
 156:uc_libc_dev/cli/cli.c ****   	memset (argv, 0, sizeofArgv); 							// Preenche os endereços do argv com valores 0, ou seja, li
 451              		.loc 1 156 0
 452 0050 0024     		movs	r4, #0
 157:uc_libc_dev/cli/cli.c ****   	
 453              		.loc 1 157 0
 454 0052 4A46     		mov	r2, r9
 156:uc_libc_dev/cli/cli.c ****   	memset (argv, 0, sizeofArgv); 							// Preenche os endereços do argv com valores 0, ou seja, li
 455              		.loc 1 156 0
 456 0054 C8F80040 		str	r4, [r8]
 157:uc_libc_dev/cli/cli.c ****   	
 457              		.loc 1 157 0
 458 0058 2146     		mov	r1, r4
 459 005a 3046     		mov	r0, r6
 460 005c FFF7FEFF 		bl	memset
 461              	.LVL49:
 189:uc_libc_dev/cli/cli.c ****           		}  else if (*s == '"')						// Checa se encontramos o caractere aspa. Sinaliza inicio d
 462              		.loc 1 189 0
 463 0060 A146     		mov	r9, r4
 464              	.LVL50:
 159:uc_libc_dev/cli/cli.c ****     	switch (pstate) {
 465              		.loc 1 159 0
 466 0062 10E0     		b	.L50
 467              	.LVL51:
 468              	.L55:
 174:uc_libc_dev/cli/cli.c ****         	    	return errCLI_EXED_ARGS;					// Retorna erro
 469              		.loc 1 174 0
 470 0064 D8F80030 		ldr	r3, [r8]
 172:uc_libc_dev/cli/cli.c **** 
 471              		.loc 1 172 0
 472 0068 3560     		str	r5, [r6]
 174:uc_libc_dev/cli/cli.c ****         	    	return errCLI_EXED_ARGS;					// Retorna erro
 473              		.loc 1 174 0
 474 006a 0133     		adds	r3, r3, #1
 475 006c 9F42     		cmp	r7, r3
 172:uc_libc_dev/cli/cli.c **** 
 476              		.loc 1 172 0
 477 006e 06F10402 		add	r2, r6, #4
 478              	.LVL52:
 174:uc_libc_dev/cli/cli.c ****         	    	return errCLI_EXED_ARGS;					// Retorna erro
 479              		.loc 1 174 0
 480 0072 C8F80030 		str	r3, [r8]
 481 0076 36D0     		beq	.L66
 172:uc_libc_dev/cli/cli.c **** 
 482              		.loc 1 172 0
 483 0078 1646     		mov	r6, r2
 176:uc_libc_dev/cli/cli.c ****     	        	pstate = P_SET_END_QUOTE;				// Vai ao estado de encontrar fim das aspas, isto porque
 484              		.loc 1 176 0
 485 007a 15F8013B 		ldrb	r3, [r5], #1	@ zero_extendqisi2
 179:uc_libc_dev/cli/cli.c **** 
 486              		.loc 1 179 0
 487 007e 222B     		cmp	r3, #34
 488 0080 0CBF     		ite	eq
 489 0082 0324     		moveq	r4, #3
 490 0084 0224     		movne	r4, #2
 491              	.LVL53:
 492              	.L50:
 159:uc_libc_dev/cli/cli.c ****     	switch (pstate) {
 493              		.loc 1 159 0
 494 0086 2B78     		ldrb	r3, [r5]	@ zero_extendqisi2
 495              	.L52:
 496 0088 53B3     		cbz	r3, .L74
 160:uc_libc_dev/cli/cli.c ****       		// PROCURA O INICIO DO ARGUMENTO
 497              		.loc 1 160 0
 498 008a 032C     		cmp	r4, #3
 499 008c FCD8     		bhi	.L52
 500 008e 01A2     		adr	r2, .L54
 501 0090 52F824F0 		ldr	pc, [r2, r4, lsl #2]
 502              		.p2align 2
 503              	.L54:
 504 0094 A5000000 		.word	.L53+1
 505 0098 65000000 		.word	.L55+1
 506 009c B5000000 		.word	.L56+1
 507 00a0 D3000000 		.word	.L57+1
 508              		.p2align 1
 509              	.L53:
 163:uc_libc_dev/cli/cli.c ****             		pstate = P_GET_INIT_ARGS;				// Sinalizo para ir para o estado de captura do argument
 510              		.loc 1 163 0
 511 00a4 FFF7FEFF 		bl	__locale_ctype_ptr
 512              	.LVL54:
 513 00a8 2B78     		ldrb	r3, [r5]	@ zero_extendqisi2
 514 00aa 1844     		add	r0, r0, r3
 515 00ac 4378     		ldrb	r3, [r0, #1]	@ zero_extendqisi2
 516 00ae 1907     		lsls	r1, r3, #28
 517 00b0 14D5     		bpl	.L65
 518 00b2 11E0     		b	.L73
 519              	.L56:
 187:uc_libc_dev/cli/cli.c ****             		pstate = P_WAIT_INIT_ARGS;				// Sinaliza para ir a estado para captura do prróximo a
 520              		.loc 1 187 0
 521 00b4 FFF7FEFF 		bl	__locale_ctype_ptr
 522              	.LVL55:
 523 00b8 2B78     		ldrb	r3, [r5]	@ zero_extendqisi2
 524 00ba 1844     		add	r0, r0, r3
 525 00bc 4278     		ldrb	r2, [r0, #1]	@ zero_extendqisi2
 526 00be 1207     		lsls	r2, r2, #28
 527 00c0 03D5     		bpl	.L61
 528              	.LVL56:
 189:uc_libc_dev/cli/cli.c ****           		}  else if (*s == '"')						// Checa se encontramos o caractere aspa. Sinaliza inicio d
 529              		.loc 1 189 0
 530 00c2 85F80090 		strb	r9, [r5]
 188:uc_libc_dev/cli/cli.c ****             		*s = '\0';								// Sinaliza na posição atual que é o fim do argumento atual
 531              		.loc 1 188 0
 532 00c6 0024     		movs	r4, #0
 533 00c8 06E0     		b	.L73
 534              	.LVL57:
 535              	.L61:
 191:uc_libc_dev/cli/cli.c **** 
 536              		.loc 1 191 0
 537 00ca 222B     		cmp	r3, #34
 538 00cc 08BF     		it	eq
 539 00ce 0324     		moveq	r4, #3
 540              	.LVL58:
 541 00d0 02E0     		b	.L73
 542              	.LVL59:
 543              	.L57:
 199:uc_libc_dev/cli/cli.c ****           		
 544              		.loc 1 199 0
 545 00d2 222B     		cmp	r3, #34
 546 00d4 08BF     		it	eq
 547 00d6 0224     		moveq	r4, #2
 548              	.L73:
 549              	.LVL60:
 201:uc_libc_dev/cli/cli.c ****         	}
 550              		.loc 1 201 0
 551 00d8 0135     		adds	r5, r5, #1
 552              	.LVL61:
 203:uc_libc_dev/cli/cli.c ****     	}
 553              		.loc 1 203 0
 554 00da D4E7     		b	.L50
 555              	.LVL62:
 556              	.L65:
 164:uc_libc_dev/cli/cli.c ****           		else
 557              		.loc 1 164 0
 558 00dc 0124     		movs	r4, #1
 559 00de D2E7     		b	.L50
 560              	.L74:
 207:uc_libc_dev/cli/cli.c **** }
 561              		.loc 1 207 0
 562 00e0 0120     		movs	r0, #1
 563 00e2 BDE8F087 		pop	{r4, r5, r6, r7, r8, r9, r10, pc}
 564              	.LVL63:
 565              	.L66:
 175:uc_libc_dev/cli/cli.c **** 	          	if (*s == '"')								// Checa se encontramos o caractere aspa. Sinaliza inicio do para
 566              		.loc 1 175 0
 567 00e6 6FF03B00 		mvn	r0, #59
 208:uc_libc_dev/cli/cli.c **** 
 568              		.loc 1 208 0
 569 00ea BDE8F087 		pop	{r4, r5, r6, r7, r8, r9, r10, pc}
 570              		.cfi_endproc
 571              	.LFE3:
 573 00ee 00BF     		.section	.text.cli_ArgsDispatch,"ax",%progbits
 574              		.align	1
 575              		.global	cli_ArgsDispatch
 576              		.thumb
 577              		.thumb_func
 579              	cli_ArgsDispatch:
 580              	.LFB4:
 225:uc_libc_dev/cli/cli.c ****   	cmd_list_active = cl;
 581              		.loc 1 225 0
 582              		.cfi_startproc
 583              		@ args = 0, pretend = 0, frame = 0
 584              		@ frame_needed = 0, uses_anonymous_args = 0
 585              	.LVL64:
 586 0000 2DE9F041 		push	{r4, r5, r6, r7, r8, lr}
 587              	.LCFI7:
 588              		.cfi_def_cfa_offset 24
 589              		.cfi_offset 4, -24
 590              		.cfi_offset 5, -20
 591              		.cfi_offset 6, -16
 592              		.cfi_offset 7, -12
 593              		.cfi_offset 8, -8
 594              		.cfi_offset 14, -4
 225:uc_libc_dev/cli/cli.c ****   	cmd_list_active = cl;
 595              		.loc 1 225 0
 596 0004 0446     		mov	r4, r0
 597 0006 0D46     		mov	r5, r1
 598 0008 1646     		mov	r6, r2
 226:uc_libc_dev/cli/cli.c **** 
 599              		.loc 1 226 0
 600 000a 204F     		ldr	r7, .L86
 601              	.LVL65:
 602              	.L82:
 603 000c 3C60     		str	r4, [r7]
 604              	.L76:
 605              	.LVL66:
 228:uc_libc_dev/cli/cli.c ****     	if (!strcmp (cl->command, argv [0])) {			// Checa se o comando atual é o mesmo digitado
 606              		.loc 1 228 0
 607 000e 2068     		ldr	r0, [r4]
 608 0010 0028     		cmp	r0, #0
 609 0012 36D0     		beq	.L85
 229:uc_libc_dev/cli/cli.c ****       		int ret = 0;
 610              		.loc 1 229 0
 611 0014 3168     		ldr	r1, [r6]
 612 0016 FFF7FEFF 		bl	strcmp
 613              	.LVL67:
 614 001a 80BB     		cbnz	r0, .L77
 615              	.LVL68:
 616              	.LBB9:
 232:uc_libc_dev/cli/cli.c ****         		lprintf("%s"CMD_TERMINATOR, cl->parameters);		// Exibe ajuda para os parametros
 617              		.loc 1 232 0
 618 001c 022D     		cmp	r5, #2
 619 001e 0CD1     		bne	.L78
 232:uc_libc_dev/cli/cli.c ****         		lprintf("%s"CMD_TERMINATOR, cl->parameters);		// Exibe ajuda para os parametros
 620              		.loc 1 232 0 is_stmt 0 discriminator 1
 621 0020 1B49     		ldr	r1, .L86+4
 622 0022 7068     		ldr	r0, [r6, #4]
 623 0024 FFF7FEFF 		bl	strcmp
 624              	.LVL69:
 625 0028 38B9     		cbnz	r0, .L78
 233:uc_libc_dev/cli/cli.c ****         		ret = pdPASS;
 626              		.loc 1 233 0 is_stmt 1
 627 002a 2269     		ldr	r2, [r4, #16]
 628 002c 1949     		ldr	r1, .L86+8
 629 002e 0120     		movs	r0, #1
 630 0030 FFF7FEFF 		bl	rprintf
 631              	.LVL70:
 234:uc_libc_dev/cli/cli.c ****       		} else if ((argc - 1) < cl->min_args) {			// Checa se a quantidade de argumentos digitados 
 632              		.loc 1 234 0
 633 0034 0120     		movs	r0, #1
 634 0036 BDE8F081 		pop	{r4, r5, r6, r7, r8, pc}
 635              	.LVL71:
 636              	.L78:
 235:uc_libc_dev/cli/cli.c ****         		lprintf(CLI_MSG_FEW_ARGS, cl->min_args);
 637              		.loc 1 235 0
 638 003a 2279     		ldrb	r2, [r4, #4]	@ zero_extendqisi2
 639 003c 9542     		cmp	r5, r2
 640 003e 07DC     		bgt	.L80
 236:uc_libc_dev/cli/cli.c ****         		ret = errCLI_FEW_ARGS;
 641              		.loc 1 236 0
 642 0040 1549     		ldr	r1, .L86+12
 643 0042 0120     		movs	r0, #1
 644 0044 FFF7FEFF 		bl	rprintf
 645              	.LVL72:
 237:uc_libc_dev/cli/cli.c ****       		} else if (cl->cmd_type == CMD_TYPE_LIST) {		// Checa se é um comando ou uma nome de outra 
 646              		.loc 1 237 0
 647 0048 6FF03D00 		mvn	r0, #61
 648 004c BDE8F081 		pop	{r4, r5, r6, r7, r8, pc}
 649              	.LVL73:
 650              	.L80:
 238:uc_libc_dev/cli/cli.c ****         		ret = cli_ArgsDispatch (cl->cmd_list, argc - 1, &argv [1]); // Chama essa a sub lista
 651              		.loc 1 238 0
 652 0050 A379     		ldrb	r3, [r4, #6]	@ zero_extendqisi2
 653 0052 681E     		subs	r0, r5, #1
 654 0054 1BB9     		cbnz	r3, .L81
 239:uc_libc_dev/cli/cli.c ****       		} else if ((argc - 1) > cl->max_args) {			// Checa se a quantidade de argumentos digitados 
 655              		.loc 1 239 0
 656 0056 A468     		ldr	r4, [r4, #8]
 657              	.LVL74:
 658 0058 0546     		mov	r5, r0
 659 005a 0436     		adds	r6, r6, #4
 660 005c D6E7     		b	.L82
 661              	.LVL75:
 662              	.L81:
 240:uc_libc_dev/cli/cli.c ****         		lprintf(CLI_MSG_MANY_ARGS, cl->max_args);
 663              		.loc 1 240 0
 664 005e 6279     		ldrb	r2, [r4, #5]	@ zero_extendqisi2
 665 0060 9042     		cmp	r0, r2
 666 0062 07DD     		ble	.L83
 241:uc_libc_dev/cli/cli.c ****         		ret = errCLI_MANY_ARGS;
 667              		.loc 1 241 0
 668 0064 0D49     		ldr	r1, .L86+16
 669 0066 0120     		movs	r0, #1
 670 0068 FFF7FEFF 		bl	rprintf
 671              	.LVL76:
 242:uc_libc_dev/cli/cli.c ****       		} else {
 672              		.loc 1 242 0
 673 006c 6FF03C00 		mvn	r0, #60
 674 0070 BDE8F081 		pop	{r4, r5, r6, r7, r8, pc}
 675              	.LVL77:
 676              	.L83:
 244:uc_libc_dev/cli/cli.c ****         	}
 677              		.loc 1 244 0
 678 0074 A368     		ldr	r3, [r4, #8]
 679 0076 311D     		adds	r1, r6, #4
 680              	.LBE9:
 257:uc_libc_dev/cli/cli.c **** 
 681              		.loc 1 257 0
 682 0078 BDE8F041 		pop	{r4, r5, r6, r7, r8, lr}
 683              	.LCFI8:
 684              		.cfi_remember_state
 685              		.cfi_restore 14
 686              		.cfi_restore 8
 687              		.cfi_restore 7
 688              		.cfi_restore 6
 689              		.cfi_restore 5
 690              		.cfi_restore 4
 691              		.cfi_def_cfa_offset 0
 692              	.LVL78:
 693              	.LBB10:
 244:uc_libc_dev/cli/cli.c ****         	}
 694              		.loc 1 244 0
 695 007c 1847     		bx	r3
 696              	.LVL79:
 697              	.L77:
 698              	.LCFI9:
 699              		.cfi_restore_state
 700              	.LBE10:
 250:uc_libc_dev/cli/cli.c ****   	}
 701              		.loc 1 250 0
 702 007e 1434     		adds	r4, r4, #20
 703              	.LVL80:
 704 0080 C5E7     		b	.L76
 705              	.L85:
 256:uc_libc_dev/cli/cli.c **** }
 706              		.loc 1 256 0
 707 0082 6FF03E00 		mvn	r0, #62
 257:uc_libc_dev/cli/cli.c **** 
 708              		.loc 1 257 0
 709 0086 BDE8F081 		pop	{r4, r5, r6, r7, r8, pc}
 710              	.LVL81:
 711              	.L87:
 712 008a 00BF     		.align	2
 713              	.L86:
 714 008c 00000000 		.word	.LANCHOR3
 715 0090 59000000 		.word	.LC7
 716 0094 5B000000 		.word	.LC8
 717 0098 5F000000 		.word	.LC9
 718 009c 80000000 		.word	.LC10
 719              		.cfi_endproc
 720              	.LFE4:
 722              		.global	cmd_list_active
 723              		.section	.bss.cmd_list_active,"aw",%nobits
 724              		.align	2
 725              		.set	.LANCHOR3,. + 0
 728              	cmd_list_active:
 729 0000 00000000 		.space	4
 730              		.section	.bss.p,"aw",%nobits
 731              		.align	2
 732              		.set	.LANCHOR1,. + 0
 735              	p:
 736 0000 00000000 		.space	4
 737              		.section	.data.initGet,"aw",%progbits
 738              		.set	.LANCHOR0,. + 0
 741              	initGet:
 742 0000 01       		.byte	1
 743              		.section	.rodata.str1.1,"aMS",%progbits,1
 744              	.LC0:
 745 0000 257300   		.ascii	"%s\000"
 746              	.LC1:
 747 0003 0A00     		.ascii	"\012\000"
 748              	.LC2:
 749 0005 08200800 		.ascii	"\010 \010\000"
 750              	.LC3:
 751 0009 256300   		.ascii	"%c\000"
 752              	.LC4:
 753 000c 25732573 		.ascii	"%s%s -- %s\012\000"
 753      202D2D20 
 753      25730A00 
 754              	.LC5:
 755 0018 25732573 		.ascii	"%s%s -- SUBLIST - %s\012\000"
 755      202D2D20 
 755      5355424C 
 755      49535420 
 755      2D202573 
 756              	.LC6:
 757 002e 0A557365 		.ascii	"\012Use '<command> ?' to show its parameters\012\000"
 757      20273C63 
 757      6F6D6D61 
 757      6E643E20 
 757      3F272074 
 758              	.LC7:
 759 0059 3F00     		.ascii	"?\000"
 760              	.LC8:
 761 005b 25730A00 		.ascii	"%s\012\000"
 762              	.LC9:
 763 005f 4D697373 		.ascii	"Missing arguments (requires %d)\012\000"
 763      696E6720 
 763      61726775 
 763      6D656E74 
 763      73202872 
 764              	.LC10:
 765 0080 4D616E79 		.ascii	"Many arguments (maximum %d)\012\000"
 765      20617267 
 765      756D656E 
 765      74732028 
 765      6D617869 
 766              		.section	.bss.c,"aw",%nobits
 767              		.set	.LANCHOR2,. + 0
 770              	c:
 771 0000 00       		.space	1
 772              		.text
 773              	.Letext0:
 774              		.file 2 "uc_libc_dev/cli/cli.h"
 775              		.file 3 "uc_libc_dev/stdio/stdio_uc.h"
 776              		.file 4 "d:\\cc\\arm-yagarto-5.4.2016q3\\arm-none-eabi\\include\\string.h"
 777              		.file 5 "d:\\cc\\arm-yagarto-5.4.2016q3\\arm-none-eabi\\include\\ctype.h"
 778              		.file 6 "uc_libc_dev/_libdef/uc_libdefs.h"
DEFINED SYMBOLS
                            *ABS*:00000000 cli.c
D:\_temp\_windows\ccYx25qj.s:20     .text.cli_GetLine:00000000 $t
D:\_temp\_windows\ccYx25qj.s:25     .text.cli_GetLine:00000000 cli_GetLine
D:\_temp\_windows\ccYx25qj.s:216    .text.cli_GetLine:000000d8 $d
D:\_temp\_windows\ccYx25qj.s:227    .text.cli_Help:00000000 $t
D:\_temp\_windows\ccYx25qj.s:232    .text.cli_Help:00000000 cli_Help
D:\_temp\_windows\ccYx25qj.s:353    .text.cli_Help:00000088 $d
D:\_temp\_windows\ccYx25qj.s:361    .text.cli_ArgsParse:00000000 $t
D:\_temp\_windows\ccYx25qj.s:366    .text.cli_ArgsParse:00000000 cli_ArgsParse
D:\_temp\_windows\ccYx25qj.s:504    .text.cli_ArgsParse:00000094 $d
D:\_temp\_windows\ccYx25qj.s:508    .text.cli_ArgsParse:000000a4 $t
D:\_temp\_windows\ccYx25qj.s:574    .text.cli_ArgsDispatch:00000000 $t
D:\_temp\_windows\ccYx25qj.s:579    .text.cli_ArgsDispatch:00000000 cli_ArgsDispatch
D:\_temp\_windows\ccYx25qj.s:714    .text.cli_ArgsDispatch:0000008c $d
D:\_temp\_windows\ccYx25qj.s:728    .bss.cmd_list_active:00000000 cmd_list_active
D:\_temp\_windows\ccYx25qj.s:724    .bss.cmd_list_active:00000000 $d
D:\_temp\_windows\ccYx25qj.s:731    .bss.p:00000000 $d
D:\_temp\_windows\ccYx25qj.s:735    .bss.p:00000000 p
D:\_temp\_windows\ccYx25qj.s:741    .data.initGet:00000000 initGet
D:\_temp\_windows\ccYx25qj.s:770    .bss.c:00000000 c
D:\_temp\_windows\ccYx25qj.s:771    .bss.c:00000000 $d
                     .debug_frame:00000010 $d

UNDEFINED SYMBOLS
rprintf
lgetchar
strlen
memset
__locale_ctype_ptr
strcmp
